<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 
            background-repeat 设置背景图片是否重复
            repeat(默认) 水平方向和垂直方向都重复
            repeat-x 只在水平方向重复
            repeat-y 只在垂直方向重复
            no-repeat 水平和垂直都不重复
        */
        div {
            width: 200px;
            height: 200px;
            border: 1px solid red;
            background-image: url(./2.png);
            background-repeat: repeat;
            background-repeat: repeat-x;
            background-repeat: repeat-y;
            background-repeat: no-repeat;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>